<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Admin\Users\UserController;
use App\Http\Controllers\Admin\Users\GroupController;
use App\Http\Controllers\Admin\Users\TagController;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::prefix('user')->group(function (){
    Route::post('login',[UserController::class,'index']);
    Route::get('info',[UserController::class,'info']);
    Route::post('logout',[UserController::class,'logout']);
    Route::get('userlist',[UserController::class,'userList']);
    Route::post('useradd',[UserController::class,'userAdd']);
    Route::get('couponlist',[UserController::class,'couponList']);
    Route::post('sendcoupon',[UserController::class,'sendCoupon']);
    Route::post('sendvip',[UserController::class,'sendVip']);
});

Route::prefix('group')->group(function (){
    Route::get('grouplist',[GroupController::class,'groupList']);
    Route::post('groupadd',[GroupController::class,'groupAdd']);
    Route::post('groupupdate',[GroupController::class,'groupUpdate']);
    Route::get('groupdelete',[GroupController::class,'groupDelete']);
    Route::post('sendgroup',[GroupController::class,'sendGroup']);
});

Route::prefix('tag')->group(function (){
    Route::get('taglist',[TagController::class,'tagList']);
    Route::post('tagadd',[TagController::class,'tagAdd']);
    Route::post('classadd',[TagController::class,'classAdd']);
    Route::post('tagupdate',[TagController::class,'tagUpdate']);
    Route::get('tagdelete',[TagController::class,'tagDelete']);
    Route::post('sendtag',[TagController::class,'sendTag']);
});

